/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package group2assignone.ucm.manager;

import group2assignone.model.Airport;
import group2assignone.ucm.UCController;
import group2assignone.view.UITool;
import group2assignone.view.manager.EditAirportView;

/**
 *
 * @author Natalie
 */
public class UCEditAirport implements UCController
{
    
    private EditAirportView view;

    public UCEditAirport(EditAirportView view)
    {
        this.view = view;
    }

    public void run() {


        if (view.getSelectedRow() >= 0) {  //if have selection
            
            view.showEditPanel();
            //view.dispose();

        } else {
            UITool.displayError("Select an Airport to Edit!!!", view);
        }
    }
}
